<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>flex_骰子</title>
    <style>
      .box li {
        width: 50px;
        height: 50px;
        padding: 4px;
        background-color: tomato;
        border-radius: 10%;
        margin: 6px;
        list-style: none;
      }
      .box .dot {
        display: inline-block;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background-color: white;
      }

      /* ===== flex ===== */
      .flex_max {
        display: flex;
      }
      .flex_max li {
        display: flex;
      }

      /* 1 */
      .flex_dice1 {
        align-items: center;
        justify-content: center;
      }

      /* 2 */
      .flex_dice2 {
        justify-content: space-between;
      }
      /* align-self: flex-end：将项目对齐到 Flex 容器的末尾。 */
      .flex_dice2 .dot:nth-of-type(2) {
        align-self: flex-end;
      }

      /* 3 */
      .flex_dice3 {
        justify-content: space-between;
      }
      /* align-self: flex-center：将项目对齐到 Flex 容器的中间。 */
      .flex_dice3 .dot:nth-of-type(2) {
        align-self: center;
      }
      /* align-self: flex-end：将项目对齐到 Flex 容器的末尾。 */
      .flex_dice3 .dot:nth-of-type(3) {
        align-self: flex-end;
      }

      /* 4 */
      .flex_dice4 {
        flex-direction: column;
        justify-content: space-between;
      }
      .flex_dice4 .column {
        display: flex;
        align-items: center;
        justify-content: space-between;
      }

      /* 5 */
      .flex_dice5 {
        flex-direction: column;
        justify-content: space-between;
      }
      .flex_dice5 .column {
        display: flex;
        align-items: center;
        justify-content: space-between;
      }
      .flex_dice5 .column:nth-of-type(2) {
        justify-content: center;
      }

      /* 6 */
      .flex_dice6 {
        flex-direction: column;
        justify-content: space-between;
      }
      .flex_dice6 .column {
        display: flex;
        align-items: center;
        justify-content: space-between;
      }
    </style>
  </head>
  <body>
    <div class="box">
      <ol class="flex_max">
        <li class="flex_dice1">
          <div class="dot"></div>
        </li>
        <li class="flex_dice2">
          <div class="dot"></div>
          <div class="dot"></div>
        </li>
        <li class="flex_dice3">
          <div class="dot"></div>
          <div class="dot"></div>
          <div class="dot"></div>
        </li>
        <li class="flex_dice4">
          <div class="column">
            <div class="dot"></div>
            <div class="dot"></div>
          </div>
          <div class="column">
            <div class="dot"></div>
            <div class="dot"></div>
          </div>
        </li>
        <li class="flex_dice5">
          <div class="column">
            <div class="dot"></div>
            <div class="dot"></div>
          </div>
          <div class="column">
            <div class="dot"></div>
          </div>
          <div class="column">
            <div class="dot"></div>
            <div class="dot"></div>
          </div>
        </li>
        <li class="flex_dice6">
          <div class="column">
            <div class="dot"></div>
            <div class="dot"></div>
          </div>
          <div class="column">
            <div class="dot"></div>
            <div class="dot"></div>
          </div>
          <div class="column">
            <div class="dot"></div>
            <div class="dot"></div>
          </div>
        </li>
      </ol>
    </div>
  </body>
</html>
